from selenium import  webdriver
from selenium.webdriver.common.by import By
from time import sleep

op = webdriver.ChromeOptions()
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_experimental_option("useAutomationExtension", False)
driver = webdriver.Chrome(options = op)

driver.get(r"http://118.121.200.162:8085/index")
driver.find_element(By.XPATH,'//*[@id="navbar"]/div/ul/li[1]/a').click()

driver.find_element(By.XPATH,'//*[@id="userID"]').send_keys('1119878139')
driver.find_element(By.XPATH,'//*[@id="password"]').send_keys('1119878139')
driver.find_element(By.XPATH,'//*[@id="submit"]').click()
sleep(1)

dialog = driver.switch_to.alert
print(dialog.text)
dialog.accept()
assert  "1119878139" in driver.page_source

sleep(2)

driver.quit()

